Skip to content

Commit

Permalink
Fix GitHub Actions deps location
Browse files Browse the repository at this point in the history
  • Loading branch information
delasy committed Aug 21, 2023
1 parent 93a54a5 commit b2c6722
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/cross-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Cross Compile

on:
push:
branches: [main]
branches: [main, release-*]
paths-ignore: ['**/*.md', '**/*.yml', '!.github/workflows/cross-compile.yml']
pull_request:
paths-ignore: ['**/*.md', '**/*.yml', '!.github/workflows/cross-compile.yml']
Expand All @@ -26,7 +26,10 @@ jobs:
- run: sudo apt-get update
- run: sudo apt-get install mingw-w64 ninja-build
- run: curl -fsSL https://cdn.thelang.io/deps.tar.gz | sudo tar -C /usr/local -xz
- run: echo "DEPS_DIR=/usr/local/the/cross-compile/${{ matrix.config.platform }}" >> $GITHUB_ENV
- if: matrix.config.platform == 'macos'
run: echo "DEPS_DIR=/usr/local/the/cross-compile/${{ matrix.config.platform }}/x86_64" >> $GITHUB_ENV
- if: matrix.config.platform != 'macos'
run: echo "DEPS_DIR=/usr/local/the/cross-compile/${{ matrix.config.platform }}" >> $GITHUB_ENV
- run: echo "/usr/local/the/osxcross/bin" >> $GITHUB_PATH
- run: sudo sed -i 's/#define _WIN32_WINNT .*/#define _WIN32_WINNT 0x0A00/' /usr/share/mingw-w64/include/_mingw.h
- run: cmake . -B ./build -G Ninja -D BUILD_TESTS=ON -D TEST_CODEGEN_PLATFORM=${{ matrix.config.platform }}
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Test

on:
push:
branches: [main]
branches: [main, release-*]
paths-ignore: ['**/*.md', '**/*.yml', '!.github/workflows/test.yml']
pull_request:
paths-ignore: ['**/*.md', '**/*.yml', '!.github/workflows/test.yml']
Expand Down Expand Up @@ -45,8 +45,10 @@ jobs:
run: brew install ninja
- run: curl -fsSL https://cdn.thelang.io/deps.tar.gz -o deps.tar.gz
- run: tar -xzf deps.tar.gz the/native/${{ matrix.config.platform }}
- if: runner.os != 'Windows'
- if: runner.os == 'Linux'
run: echo "DEPS_DIR=$PWD/the/native/${{ matrix.config.platform }}" >> $GITHUB_ENV
- if: runner.os == 'macOS'
run: echo "DEPS_DIR=$PWD/the/native/${{ matrix.config.platform }}/x86_64" >> $GITHUB_ENV
- if: runner.os == 'Windows'
run: echo "DEPS_DIR=$PWD/the/native/${{ matrix.config.platform }}" | Out-File -FilePath $env:GITHUB_ENV -Append
- if: matrix.config.memcheck != 'memcheck'
Expand Down

0 comments on commit b2c6722

Please sign in to comment.