diff --git a/.github/workflows/page.yml b/.github/workflows/page.yml index 179234a..b08e4e7 100644 --- a/.github/workflows/page.yml +++ b/.github/workflows/page.yml @@ -11,8 +11,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Setup LLVM and Odin - run: ./setup_odin.sh + - uses: laytan/setup-odin@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + release: latest - uses: actions/setup-node@v4 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c212b75..e3567a3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,8 +13,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Setup LLVM and Odin - run: ./setup_odin.sh + - uses: laytan/setup-odin@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + release: latest - uses: actions/setup-node@v4 with: diff --git a/setup_odin.sh b/setup_odin.sh deleted file mode 100755 index 0e0cec6..0000000 --- a/setup_odin.sh +++ /dev/null @@ -1,39 +0,0 @@ -# Script to setup Odin and LLVM 14 on GitHub Actions - -ODIN_RELEASE_ID=dev-2024-03 - -echo "Setting up LLVM 14 and Odin ${ODIN_RELEASE_ID}..." - -wget -O odin.zip -q https://github.com/odin-lang/Odin/releases/download/${ODIN_RELEASE_ID}/odin-ubuntu-amd64-${ODIN_RELEASE_ID}.zip -unzip odin.zip -unzip dist.zip -mkdir -p /home/runner/odin -cp -r dist/* /home/runner/odin - -echo "/home/runner/odin" >>$GITHUB_PATH -echo "/usr/lib/llvm-14/bin" >>$GITHUB_PATH -export PATH="/home/runner/odin:$PATH" -export PATH="/usr/lib/llvm-14/bin:$PATH" - -echo "Done!" -echo "llvm: $(llvm-config --version)" -echo "wasm-ld: $(wasm-ld --version)" -echo "odin: $(odin version)" - -if ! command -v llvm-config &> /dev/null -then - echo "llvm-config could not be found" - exit 1 -fi - -if ! command -v wasm-ld &> /dev/null -then - echo "wasm-ld could not be found" - exit 1 -fi - -if ! command -v odin &> /dev/null -then - echo "odin could not be found" - exit 1 -fi \ No newline at end of file