update CI #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: | |
push: | |
pull_request: | |
jobs: | |
update-nightly-tag: | |
name: Update nightly release tag | |
runs-on: ubuntu-20.04 | |
if: github.event_name == 'push' && github.ref == 'refs/heads/zoff99/tweaks_001' | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Move nightly tag to head for nightly release | |
run: git tag -f nightly && git push origin nightly -f | |
build-linux: | |
name: Linux | |
runs-on: ubuntu-20.04 | |
needs: [update-nightly-tag] | |
if: | | |
always() && | |
(needs.update-nightly-tag.result == 'success' || | |
needs.update-nightly-tag.result == 'skipped') | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install dependencies | |
run: | | |
sudo apt-get update && \ | |
sudo DEBIAN_FRONTEND=noninteractive \ | |
apt-get install -y --no-install-recommends \ | |
ca-certificates \ | |
libconfig-dev \ | |
libsodium-dev \ | |
pkg-config | |
- name: compile binary | |
run: | | |
make -j5 all | |
- name: compile binary with ASAN | |
run: | | |
make -j5 asan_all | |
- name: test binary | |
run: | | |
ldd tuntox || echo "" | |
ls -hal tuntox | |
./tuntox -V | |
./tuntox & | |
sleep 50 | |
- name: test binary with ASAN | |
run: | | |
ldd asan_tuntox_nostatic || echo "" | |
ls -hal asan_tuntox_nostatic | |
./asan_tuntox_nostatic -V | |
./asan_tuntox_nostatic & | |
sleep 50 | |
- name: Rename artifact for nightly upload | |
if: github.event_name == 'push' && github.ref == 'refs/heads/zoff99/tweaks_001' | |
run: | | |
cp ./tuntox tuntox_nightly | |
cp ./asan_tuntox_nostatic asan_tuntox_nostatic_nightly | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tuntox | |
path: tuntox | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: asan_tuntox_nostatic | |
path: asan_tuntox_nostatic | |
- name: Upload to nightly release | |
uses: ncipollo/release-action@v1 | |
if: github.event_name == 'push' && github.ref == 'refs/heads/zoff99/tweaks_001' | |
with: | |
allowUpdates: true | |
tag: nightly | |
omitBodyDuringUpdate: true | |
omitNameDuringUpdate: true | |
prerelease: true | |
replacesArtifacts: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
artifacts: "tuntox_nightly,asan_tuntox_nostatic_nightly" | |
build-macos: | |
runs-on: macos-12 | |
needs: [update-nightly-tag] | |
if: | | |
always() && | |
(needs.update-nightly-tag.result == 'success' || | |
needs.update-nightly-tag.result == 'skipped') | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install deps | |
run: brew install libsodium | |
- name: compile binary | |
run: | | |
make -j5 tuntox_nostatic | |
- name: test binary | |
run: | | |
otool -L tuntox_nostatic || echo "" | |
ls -hal tuntox_nostatic | |
./tuntox_nostatic -V | |
./tuntox_nostatic & | |
sleep 50 | |
build-macos14arm: | |
runs-on: macos-14 | |
needs: [update-nightly-tag] | |
if: | | |
always() && | |
(needs.update-nightly-tag.result == 'success' || | |
needs.update-nightly-tag.result == 'skipped') | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install deps | |
run: brew install libsodium | |
- name: compile binary | |
run: | | |
make -j5 tuntox_nostatic | |
- name: test binary | |
run: | | |
otool -L tuntox_nostatic || echo "" | |
ls -hal tuntox_nostatic | |
./tuntox_nostatic -V | |
./tuntox_nostatic & | |
sleep 50 | |
build-windows: | |
runs-on: ubuntu-22.04 | |
needs: [update-nightly-tag] | |
if: | | |
always() && | |
(needs.update-nightly-tag.result == 'success' || | |
needs.update-nightly-tag.result == 'skipped') | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install dependencies | |
run: | | |
sudo apt-get update && \ | |
sudo DEBIAN_FRONTEND=noninteractive \ | |
apt-get install -y --no-install-recommends \ | |
ca-certificates \ | |
pkg-config | |
- name: compile binary | |
run: | | |
echo "WRITE ME" |