diff options
| -rw-r--r-- | .github/workflows/nightly.yml | 30 | ||||
| -rwxr-xr-x | build.sh | 20 |
2 files changed, 45 insertions, 5 deletions
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 8c789a5..4811f01 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -7,6 +7,36 @@ on: #- cron: 0 20 * * * jobs: + dist-arm64-darwin: + runs-on: macos-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@v1 + - name: Download LLVM and setup PATH + run: | + brew install llvm@14 + echo "/usr/local/opt/llvm@14/bin" >> $GITHUB_PATH + TMP_PATH=$(xcrun --show-sdk-path)/user/include + echo "CPATH=$TMP_PATH" >> $GITHUB_ENV + - name: Download Odin + run: | + git clone https://github.com/odin-lang/Odin + - name: Build Odin + run: | + cd Odin + make release + - name: Build ols + run: ./build.sh CI -target:darwin_arm64 -extra-linker-flags:"--target=arm64-apple-macos" + - name: Move to Dist + run: | + mkdir dist + mv ols dist/ols-arm64-darwin + - name: Upload artifacts + uses: actions/upload-artifact@v2 + with: + name: dist-arm64-darwin + path: ./dist + dist-x86_64-darwin: runs-on: macos-latest timeout-minutes: 15 @@ -3,11 +3,13 @@ if [[ $1 == "CI" ]] then + shift + export PATH=$PATH:$PWD/Odin #BUG in odin test, it makes the executable with the same name as a folder and gets confused. cd tests - odin test ../tests -collection:shared=../src -o:speed + odin test ../tests -collection:shared=../src -o:speed $@ if ([ $? -ne 0 ]) then @@ -28,10 +30,14 @@ then fi if [[ $1 == "single_test" ]] then + shift + #BUG in odin test, it makes the executable with the same name as a folder and gets confused. cd tests - odin test ../tests -collection:shared=../src -test-name:$2 + odin test ../tests -collection:shared=../src -test-name:$@ + + shift if ([ $? -ne 0 ]) then @@ -44,10 +50,12 @@ fi if [[ $1 == "test" ]] then + shift + #BUG in odin test, it makes the executable with the same name as a folder and gets confused. cd tests - odin test ../tests -collection:shared=../src + odin test ../tests -collection:shared=../src $@ if ([ $? -ne 0 ]) then @@ -59,9 +67,11 @@ then fi if [[ $1 == "debug" ]] then - odin build src/ -collection:shared=src -out:ols -use-separate-modules -debug + shift + + odin build src/ -collection:shared=src -out:ols -use-separate-modules -debug $@ exit 0 fi -odin build src/ -collection:shared=src -out:ols -o:speed +odin build src/ -collection:shared=src -out:ols -o:speed $@ |