Fl4m3Ph03n1x
Background
I am trying to get a Github Action working with Windows and Bakeware because I am trying to create a release using it.
However, I am having issues with the environment variables.
Code
In Bakeware’s setup page it is mentioned that we have to set the MAKE and CC environment variables:
In my Github Action, that is exactly what I do (I think):
name: build
env:
MIX_ENV: test
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Build on Windows
runs-on: windows-2019
env:
CC: gcc
MAKE: make
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
elixir-version: '1.13.x' # Define the elixir version [required]
otp-version: '24.2.x' # Define the OTP version [required]
- name: Install choco
shell: powershell
run: |
Set-ExecutionPolicy -ExecutionPolicy Bypass
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
- name: Install bakeware dependencies
shell: powershell
run: choco install -y zstandard make mingw
- name: Install Dependencies
shell: powershell
run: mix deps.get
- name: Run credo code analyser
shell: powershell
run: mix credo --strict
I am even using powershell to do it (even though I am not really sure if this is needed).
Problem
However my GitHub Actions code comes back with this error:
==> bakeware
mkdir "d:/a/market_manager/market_manager/_build/test/lib/bakeware/obj"
mkdir "d:/a/market_manager/market_manager/_build/test/lib/bakeware/launcher"
mkdir "d:/a/market_manager/market_manager/_build/test/lib/bakeware/obj/zstd/lib/decompress"
mkdir: cannot create directory 'd:/a/market_manager/market_manager/_build/test/lib/bakeware/obj/zstd/lib/decompress': No such file or directory
make: *** [Makefile:70: d:/a/market_manager/market_manager/_build/test/lib/bakeware/obj/zstd/lib/decompress] Error 1
could not compile dependency :bakeware, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile bakeware", update it with "mix deps.update bakeware" or clean it with "mix deps.clean bakeware"
** (Mix) Could not compile with "make" (exit status: 2).
It says it cannot compile with make.
Question
I have tried copy/pasting the section:
env:
CC: gcc
MAKE: make
To every section in that file I could think of, but I always end up with the same issue.
What am I doing wrong?
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











Showing Posts 1 to 8- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
cmo
I wonder if it’s because
mkdiris not creating the parents of that last path. You could try a different shell…?Edit: I forgot I added tests to the bakeware CI. Try copy what’s in here:
https://github.com/bake-bake-bake/bakeware/blob/main/.github/workflows/main.yml
Fl4m3Ph03n1x
I tested this script and I got the same error:
This is my tweaked file:
Bakeware environment vars keep being the problem for the windows setup.
cmo
Why do you think it’s the env vars? The error states it is
mkdirthat is failing. You’ll see that the Makefile tries to handlemkdirdifferently for Windows.Could you try to isolate whether it is the CMD run or PowerShell run that is failing, or both?
Fl4m3Ph03n1x
I have tried to install
chocowith powershell and then run the commands using cmd. The result is still the same.This is likely the most vanilla action I can think of, I dont get why something as simple as
mkdirwould not work.This Action:
Results in this error:
Fl4m3Ph03n1x
By changing the GitHub Action a little I was able to inspect some behaviour:
In this snippet I manually create the needed folders and then I assert on them. The output is as follows:
We can see that:
Test-PathreturnsTrue, which means that'd:/a/market_manager/market_manager/_build/test/lib/bakeware/obj/zstd/lib/decompress'does exist.This only makes things more confusing to me as the error has still not changed:
I really can’t understand the error
no such file of directorywhen every command I used shows beyond reasonable doubt that the folder does exist.Any ideas or suggestions for investigation would be welcome :S
Fl4m3Ph03n1x
To make it clear, using the exact same github action from bakeware (I removed the macos part which I dont need):
Still fails with the same error:
I wonder if I need some special configuration for my Github Workers that maybe I am not aware of?
Fl4m3Ph03n1x
I created a MWE called bake_test:
In this minimal umbrella app, the github action still fails for windows and Ubuntu.
I am using the exact same file for the github workflow used by bakeware.
I now believe one of 2 things:
mix.exsfile has issues I am not aware ofI am trying to figure out what is going on, but I am having trouble.
Fl4m3Ph03n1x
I think I finally figured it out. To my understanding, the issue was in the
Makefile.I have submitted a PR that fixes the issue:
Basically,
mkdirwas not behaving as expected between cmd and powershell.I am now awaiting for approval of the authors.
Furthermore, I also updated my MWE with the fork in my account so anyone can see it working.